<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	   <link rel="stylesheet" href="/css/pager.css" type="text/css"></link>
	<script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="/js/pageView.js"></script> 
	<script src="/js/jquery.KinSlideshow-1.2.1.min.js" type="text/javascript"></script>
	
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <script type="text/javascript">
	    //打开页面随机选择 切换方式（方向）,怕增大KinSlideshow.js文件 就没把随机切换写到里面。
		//使用时如有需要随机自己写在前面是一样的。而且还可以只固定随机切换哪几种。
		
		var moveStyle
		var rand =parseInt(Math.random()*4)
		switch(rand){
			case 0:	moveStyle="left" ;break;
			case 1:	moveStyle="right" ;break;
			case 2:	moveStyle="down" ;break;
			case 3:	moveStyle="up" ;break;
		}
		$(function(){
			$("#KinSlideshow1").KinSlideshow({moveStyle:moveStyle});
			
		})
	function pageNoId(pageNo){	
			var orderBy =$("#orderBy").val();
			window.location.href="/index.do?type="+orderBy+"&pageNo="+pageNo;
			}	
			 
		</script>
  </head>
  
  <body>
  <%@ include file="/hader.jsp"%> 
    <div class="wrapper">
    <input id="orderBy" type="hidden" value="${type }"/>
	<div class="banner fl">
		<div id="KinSlideshow1" style="visibility:hidden;"> 
			<a href="#"><img src="images/banner_01.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_02.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_03.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_04.jpg" alt="" width="724" height="220" /></a> 
		</div>
	</div>
	<div class="banner_right fr"> <a href="#"><img src="images/index_05.jpg" alt="" title="手机版" /></a><a href="#"><img src="images/index_06.jpg" alt="" title="HD版" /></a> </div>
	<div class="cb"></div>
	<div class="index_px">
		<div class="left fl">排序：
		 <a href="/index.do?type=1">价格升序</a>
		 <a href="/index.do?type=2">价格降序</a>
		 <a href="/index.do?type=3">最新</a>
		 <a href="/index.do?type=4">倒计时</a>
		 
		 </div>
		       
		<div class="cb"></div>
		<div class="cb"></div>
	</div>
	<div class="index_product">
	 
	<c:forEach var="i" items="${pager.resultList}">
		<div class="list">
			<div class="top"> <a href="/packinfo.do?method=huodongDetail&aid=${i.id}"><img src="images/index_08.jpg" alt="" class="img" /></a>市场价:<s>${i.price }元</s> 参加人数：<span><!--i.packageinfo.packageMaxPeople--></span>人 <img src="images/man.jpg" alt="" /><span>${i.manCount }</span> <img src="images/women.jpg" alt="" /><span>${i.womanCount }</span> </div>
			<div class="middle"><font><a href="/packinfo.do?method=huodongDetail&aid=${i.id}"><img src="images/index_10.jpg" alt="" /></a></font>¥<span>${i.activityinfoPrice } </span></div>
			<div class="cb"></div>
			<div class="bottom">活动日期：<fmt:formatDate value="${i.beginTime }" pattern="yyyy/M/d hh:mm:ss"/><br /><span>【${i.activityinfoName }】</span>${i.packageName }</div>
		</div>
	</c:forEach>
		<div class="cb"></div>
	</div>
	<div class="cb"></div>
		   <div id="pager" style="width: 500px; float:left;margin:-17px auto 15px 258px;">
<script type="text/javascript">
		            var pager = new PagerView('pager');
		            //共计多少条信息
		            pager.itemCount = ${pager.rowCount};
					//共计多少页
					pager.pageCount=${pager.pageCount};
					//每页显示记录数
					pager.size =${pager.pageSize};
					//当前页码, 从1开始
					pager.index =${pager.pageNo} ;
					//alert(pager.index);
					pager.render();
				</script>
				</div>
	<div class="cb"></div>
</div>
<%@ include file="/footer.html"%> 
  </body>
</html>
